﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Runtime.Remoting.Messaging;
using System.Text;
using System.Threading.Tasks;

namespace Gtkj.CMS.DALFactory
{
    public class DBDataSessionThreadLonely
    {
        //DB线程内唯一
        public static DBDataSession CreateDBDataSession()
        {
            DBDataSession DB = (DBDataSession)CallContext.GetData("DBDataSession");
            if (DB == null)
            {
                DB = new DALFactory.DBDataSession();
                CallContext.SetData("DBDataSession", DB);
            }
            return DB;
        }
    }
}
